package tr.edu.yildiz.crystalapp;

import java.io.InputStream;

import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

import tr.edu.yildiz.crystalapp.R;

import android.content.res.Resources;

public class AgentInfraActivator implements BundleActivator {
    
    public static final String AGENT_INFRA_PATH="file:///appagentinfra.jar";
    private Resources res;
    public AgentInfraActivator(Resources res) {
        this.res = res;
    }
    
    @Override
    public void start(BundleContext arg0) throws Exception {

        InputStream is = res.openRawResource(R.raw.appagentinfra);
        
        Bundle bundle = arg0.installBundle(AGENT_INFRA_PATH, is);
        bundle.start();
    }

    @Override
    public void stop(BundleContext arg0) throws Exception {
        // TODO Auto-generated method stub

    }

}
